async function testSingleCustomer() {
  try {
    console.log('Testing single customer creation...');
    
    const customerData = {
      name: "测试客户",
      phone: "13800138000",
      phone2: "13900139000",
      phone2Purpose: "备用电话",
      wechat: "testwechat",
      wechatPurpose: "工作微信",
      qq: "999999999",
      qqPurpose: "QQ号码",
      whatsapp: "+8613800138000",
      whatsappPurpose: "国际客户",
      telegram: "@testcustomer",
      telegramPurpose: "海外沟通",
      address: "测试地址",
      email: "testcustomer@example.com",
      company: "测试公司",
      notes: "测试备注"
    };
    
    const response = await fetch('http://localhost:3000/api/customers', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      body: JSON.stringify(customerData),
    });
    
    if (response.ok) {
      const result = await response.json();
      console.log('Single customer created:', result);
      
      // Now fetch the customer to see all fields
      const getResponse = await fetch(`http://localhost:3000/api/customers/${result.id}`);
      if (getResponse.ok) {
        const customer = await getResponse.json();
        console.log('Full customer data:', customer);
      } else {
        console.error('Failed to fetch customer:', await getResponse.text());
      }
    } else {
      console.error('Failed to create customer:', await response.text());
    }
  } catch (error) {
    console.error('Error during single customer test:', error);
  }
}

testSingleCustomer();